/*********************************************************************************************************************
* TC264 Opensourec Library 锟斤拷锟斤拷TC264 锟斤拷源锟解）锟斤拷一锟斤拷锟斤拷锟节官凤拷 SDK 锟接口的碉拷锟斤拷锟斤拷锟斤拷源锟斤拷
* Copyright (c) 2022 SEEKFREE 锟斤拷煽萍锟�
*
* 锟斤拷锟侥硷拷锟斤拷 TC264 锟斤拷源锟斤拷锟揭伙拷锟斤拷锟�
*
* TC264 锟斤拷源锟斤拷 锟斤拷锟斤拷锟斤拷锟斤拷
* 锟斤拷锟斤拷锟皆革拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟结发锟斤拷锟斤拷 GPL锟斤拷GNU General Public License锟斤拷锟斤拷 GNU通锟矫癸拷锟斤拷锟斤拷锟街わ拷锟斤拷锟斤拷锟斤拷锟�
* 锟斤拷 GPL 锟侥碉拷3锟芥（锟斤拷 GPL3.0锟斤拷锟斤拷锟斤拷选锟斤拷模锟斤拷魏魏锟斤拷锟斤拷陌姹撅拷锟斤拷锟斤拷路锟斤拷锟斤拷锟�/锟斤拷锟睫革拷锟斤拷
*
* 锟斤拷锟斤拷源锟斤拷姆锟斤拷锟斤拷锟较ｏ拷锟斤拷锟斤拷芊锟斤拷锟斤拷锟斤拷茫锟斤拷锟斤拷锟轿达拷锟斤拷锟斤拷锟斤拷魏蔚谋锟街�
* 锟斤拷锟斤拷没锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟皆伙拷锟绞猴拷锟截讹拷锟斤拷途锟侥憋拷证
* 锟斤拷锟斤拷细锟斤拷锟斤拷渭锟� GPL
*
* 锟斤拷应锟斤拷锟斤拷锟秸碉拷锟斤拷锟斤拷源锟斤拷锟酵憋拷盏锟揭伙拷锟� GPL 锟侥革拷锟斤拷
* 锟斤拷锟矫伙拷校锟斤拷锟斤拷锟斤拷<https://www.gnu.org/licenses/>
*
* 锟斤拷锟斤拷注锟斤拷锟斤拷
* 锟斤拷锟斤拷源锟斤拷使锟斤拷 GPL3.0 锟斤拷源锟斤拷锟街ば拷锟� 锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟轿拷锟斤拷陌姹�
* 锟斤拷锟斤拷锟斤拷锟接拷陌锟斤拷锟� libraries/doc 锟侥硷拷锟斤拷锟铰碉拷 GPL3_permission_statement.txt 锟侥硷拷锟斤拷
* 锟斤拷锟街わ拷锟斤拷锟斤拷锟� libraries 锟侥硷拷锟斤拷锟斤拷 锟斤拷锟斤拷锟侥硷拷锟斤拷锟铰碉拷 LICENSE 锟侥硷拷
* 锟斤拷迎锟斤拷位使锟矫诧拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷 锟斤拷锟睫革拷锟斤拷锟斤拷时锟斤拷锟诫保锟斤拷锟斤拷煽萍锟斤拷陌锟饺拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟�
*
* 锟侥硷拷锟斤拷锟斤拷          cpu1_main
* 锟斤拷司锟斤拷锟斤拷          锟缴讹拷锟斤拷煽萍锟斤拷锟斤拷薰锟剿�
* 锟芥本锟斤拷息          锟介看 libraries/doc 锟侥硷拷锟斤拷锟斤拷 version 锟侥硷拷 锟芥本说锟斤拷
* 锟斤拷锟斤拷锟斤拷锟斤拷          ADS v1.8.0
* 锟斤拷锟斤拷平台          TC264D
* 锟斤拷锟斤拷锟斤拷锟斤拷          https://seekfree.taobao.com/
*
* 锟睫改硷拷录
* 锟斤拷锟斤拷              锟斤拷锟斤拷                锟斤拷注
* 2022-09-15       pudding            first version
********************************************************************************************************************/

#include "zf_common_headfile.h"
#pragma section all "cpu1_dsram"
// 锟斤拷锟斤拷锟斤拷锟斤拷锟�#pragma section all restore锟斤拷锟街拷锟斤拷全锟街憋拷锟斤拷锟斤拷锟斤拷锟斤拷CPU1锟斤拷RAM锟斤拷


// 锟斤拷锟教碉拷锟诫到锟斤拷锟街拷锟接︼拷锟窖★拷泄锟斤拷锟饺伙拷锟斤拷锟絩efresh刷锟斤拷一锟斤拷之锟斤拷锟劫憋拷锟斤拷
// 锟斤拷锟斤拷默锟斤拷锟斤拷锟斤拷为锟截憋拷锟脚伙拷锟斤拷锟斤拷锟斤拷锟皆硷拷锟揭伙拷锟斤拷锟斤拷选锟斤拷properties->C/C++ Build->Setting
// 然锟斤拷锟斤拷锟揭诧拷拇锟斤拷锟斤拷锟斤拷业锟紺/C++ Compiler->Optimization->Optimization level锟斤拷锟斤拷锟斤拷锟脚伙拷锟饺硷拷
// 一锟斤拷默锟斤拷锟铰斤拷锟斤拷锟侥癸拷锟教讹拷锟斤拷默锟较匡拷2锟斤拷锟脚伙拷锟斤拷锟斤拷舜锟斤拷也锟斤拷锟斤拷锟斤拷锟斤拷为2锟斤拷锟脚伙拷

// 锟斤拷锟斤拷TC系锟斤拷默锟斤拷锟角诧拷支锟斤拷锟叫讹拷嵌锟阶的ｏ拷希锟斤拷支锟斤拷锟叫讹拷嵌锟斤拷锟斤拷要锟斤拷锟叫讹拷锟斤拷使锟斤拷 enableInterrupts(); 锟斤拷锟斤拷锟斤拷锟叫讹拷嵌锟斤拷
// 锟津单碉拷说实锟斤拷锟较斤拷锟斤拷锟叫断猴拷TC系锟叫碉拷硬锟斤拷锟皆讹拷锟斤拷锟斤拷锟斤拷 disableInterrupts(); 锟斤拷锟杰撅拷锟斤拷应锟轿何碉拷锟叫断ｏ拷锟斤拷锟斤拷锟揭拷锟斤拷锟斤拷约锟斤拷侄锟斤拷锟斤拷锟� enableInterrupts(); 锟斤拷锟斤拷锟斤拷锟叫断碉拷锟斤拷应锟斤拷


// **************************** 锟斤拷锟斤拷锟斤拷锟斤拷 ****************************
uint32 car_flag;

void core1_main(void)
{
    disable_Watchdog();                     // 关闭看门狗
    interrupt_global_enable(0);             // 打开全局中断
    // 此处编写用户代码 例如外设初始化代码等

    cpu_wait_event_ready();                 // 等待所有核心初始化完毕
    while (TRUE)
    {
        // 判断摄像头图像是否捕获完成
        if (mt9v03x_finish_flag)
        {
            // 开始运行
            if (ramp_type == RAMP_NONE)
                cam();
            else
                run_ramp();

            mt9v03x_finish_flag = 0;
        }
    }
}

#pragma section all restore
